package cn.kgc.online.common.handler;


import io.swagger.annotations.ApiModel;
import lombok.Data;

@Data
@ApiModel(value = "全局异常")
public class KgcOnlineException extends RuntimeException {

    private Integer code;

    public KgcOnlineException(String message, Integer code) {
        super(message);
        this.code = code;
    }

    public KgcOnlineException(Integer code) {
        this.code = code;
    }

    @Override
    public String toString() {
        return "KgcOnlineException{" +
                "message=" + this.getMessage() +
                "code=" + code +
                '}';
    }
}
